package com.yj.web.service;


import com.yj.web.dao.po.admin.Area;
import com.yj.web.dao.po.admin.Department;
import com.yj.web.dao.po.admin.Duty;
import com.yj.web.dao.po.admin.Employee;

import java.util.List;

/**
 * Created by yyl on 15/5/5.
 */
public interface EmployeeService {
    public long createEmployee(Employee employee);
    public Employee findEmployeeByPhone(String phone);
    public Employee loginByMsg(String phone, String code);

    public Employee findEmployeeById(long id);
    public String updateEmployee(Employee employee);
    public Employee loginByPhonePasswd(String phone, String passwd);

    public boolean checkMsgCode(String phone, String code); // 验证验证码
    public void setLoginKeyByMsg(String phone, String code); // 设置验证码

    public List<Employee> listEmployee(String name, String department, String phone, int page, int size);
    public int countEmployee(String name, String department, String phone);
    public boolean deleteEmployeeById(int id);

    public boolean resetPassword(Employee employee);

    public int insertDuty(String name);

    public List<Duty> listDuty();

    public int insertDepartment(String name);

    public List<Department> listDepartment();

    public int insertArea(String name);

    public List<Area> listArea();

    public List<Employee> listManager();

    public boolean updateEmployeeStatus(long id, int isActive);
}
